package com.rfid.afd.activity.demo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.rfid.rls_psw.App;
import com.rfid.rls_psw.R;
import com.rfid.util.RfidManager;
import com.rfid.util.Util;

public class MachineActivity extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_machine1);

        App app = (App) getApplication();
        app.init();
        RfidManager.getInstance().setDecodeEpcEnable(false);
        RfidManager.getInstance().connect(this);
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        RfidManager.getInstance().quit();
    }

    public void record(View view) {
        RecordActivity.startAcitivity(this);
    }

    public void borrow(View view) {
        BorrowActivity.startActivity(this);
    }

    public void check(View view) {
        CheckMachineActivity.startActivity(this);
    }

    public void search(View view) {
        Util.startActivity(this,SearchActivity.class);
    }

    public void revert(View view) {
        Util.startActivity(this,ReturnActivity.class);
    }
}